package cn.sharp.bbs.dao.score;

import cn.sharp.bbs.entity.DO.Datadict;
import cn.sharp.bbs.entity.DO.Task;
import cn.sharp.bbs.entity.DO.Taskrate;
import org.apache.ibatis.annotations.Select;

import java.util.Date;
import java.util.List;

/**
 * @className: TaskDao
 * @description: 积分任务相关Dao
 * @author: 王晓崧
 * @date: 2022/7/9
 **/
public interface TaskDao {

    @Select("select ddict_name from t_data_dict where ddict_type=#{type} and ddict_code=#{code}")
    String getNameByDict(Datadict datadict);

    @Select("select ddict_code from t_data_dict where ddict_type=#{type} and ddict_name=#{name}")
    int getCodeByDict(Datadict datadict);

    List<Datadict> getTaskTypeList();

    List<Taskrate> getSameDayTask(Long u_id);

    Date getLastTime(Long userID);

    List<Task> getSameDayTaskList();

    Taskrate getTaskRate(Taskrate rate);

    int checkIsAdministrator(Long u_id);

    int checkIsSignIn(Long u_id);
}
